<!DOCTYPE html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../assert_selection.js"></script>
<script>
// This test makes sure that deletion of an element auto-removes a blank element
// before it.
selection_test(
    '<div contenteditable>ab <i> </i> <img src="../resources/abe.png">|',
    'delete',
    '<div contenteditable>ab\u00A0|</div>',
    'A space in <i> is collapsed.');
selection_test(
    '<div contenteditable>ab<i> </i> <img src="../resources/abe.png">|',
    'delete',
    '<div contenteditable>ab<i>\u00A0|</i></div>',
    'A space in <i> is not collapsed.');
</script>
